#!/bin/sh -e

printf 'cflags = %s\nldflags = %s\ncc = %s\nyacc = %s\ndestdir = %s\n' \
       "$CFLAGS -Wall -pedantic -Wcast-qual -O2" \
       "$LDFLAGS -static" \
       "${CC:-cc}" \
       "${YACC:-yacc}" \
       "$1" |
cat - ninja.in > build.ninja

ninja
ninja install
